﻿using MovingChame.Web.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MovingChame.Web.Infrastructure
{
    interface IAbstractTourProvider
    {
        /* 
         * AbstractTour is the blue print of ConcreteTour.
         * AbstractTour is marked as 
         * (1) planning once created, 
         * (2) active when an instance is derived from (ConcreteTour created),
         * (3) inactive when the creator want to delete it
         * Planning AbstractTour are mutable. Active and Inactive AbstractTour are immutable. Inactive tour is dead, cannot be used anymore.
         */
        int AddAbstractTour(string name, int tourLength, TourType tourType, ViewProperty viewProperty, string startLocation,
            string summary, string description);

        AbstractTour GetAbstractTourById(int abstractTourId); //get abstract tour by ID when cloning a new abstract tour to modify

        Boolean UpdatePlanningAbstractTour(int abstractTourId, AbstractTour updatedAbstractTour);

        Boolean ActivateAbstractTour(int abstractTourId);

        Boolean RemoveAbstractTour(int abstractTourId); //no abstract tour can be removed. marked it as inactive only.

        IQueryable<AbstractTour> SearchAbstractToursInName(string keyword);

        IQueryable<AbstractTour> GetAbstractToursByCreator(int creatorId);

        IQueryable<AbstractTour> GetOfficialAbstractTours();

        IQueryable<AbstractTour> GetUnofficialAbstractTours();

        IQueryable<AbstractTour> GetAbstractToursByStartLocation(string startLocationName);

        IQueryable<AbstractTour> GetPrivateTours(int userId);
   }
}